<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_goods', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamps();

            $table->integer('order_id')->unsigned()->comment('订单id号');

            $table->integer('goods_id')->unsigned()->comment('商品id');

            $table->integer('goods_sku_id')->unsigned()->comment('skuid');

            $table->integer('seller_id')->default(-1)->comment('商铺id');

            $table->string('goods_name')->comment('商品名称');

            $table->string('num')->comment('商品数量');

            $table->string('sku_msg')->comment('sku信息');

            $table->decimal('price')->comment('商品价格');


        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order_goods');
    }
}
